package com.zhaotianhao.rentingservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author Z-7
 * @Date 2022/5/16
 */
@Data
@Accessors(chain = true)
@TableName("t_log")
@Document("log")
public class Log {
    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    @Id
    private String id;
    /**
     * 操作名称
     */
    private String operation;

    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date operationTime;
}
